]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
gdm: Handle absence of Fprint.Manager service
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 14 Mar 2017 20:02:51 +0000 (21:02 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 20 Mar 2017 18:02:07 +0000 (19:02 +0100)
We rely on the service to detect whether a fingerprint reader is
present. It is fine to not support fingerprint authentication
when the service is missing, but currently we don't handle this
case at all and end up with a non-functional login screen.

https://bugzilla.gnome.org/show_bug.cgi?id=780063

js/gdm/fingerprint.js
js/gdm/util.js

index bce0bc6a7b64f6b42e15cee9786c3fe2e8b39f08..2aeb377cefa79fb8671a4c3cc81d515421370cbc 100644 (file)
@@ -23,6 +23,12 @@ function FprintManager() {
                                    g_object_path: '/net/reactivated/Fprint/Manager',
                                    g_flags: (Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES) });
 
-    self.init(null);
+    try {
+        self.init(null);
+    } catch(e) {
+        log('Failed to connect to Fprint service: ' + e.message);
+        return null;
+    }
+
     return self;
 }
index 2ff59cb755e42e4aaf1e50268ba2c74f8694083d..6876cbef94cbb62bfc3dd5e91425bc110206026d 100644 (file)
@@ -133,7 +133,7 @@ const ShellUserVerifier = new Lang.Class({
                                Lang.bind(this, this._updateDefaultService));
         this._updateDefaultService();
 
-        this._fprintManager = new Fprint.FprintManager();
+        this._fprintManager = Fprint.FprintManager();
         this._smartcardManager = SmartcardManager.getSmartcardManager();
 
         // We check for smartcards right away, since an inserted smartcard
@@ -293,7 +293,8 @@ const ShellUserVerifier = new Lang.Class({
     _checkForFingerprintReader: function() {
         this._haveFingerprintReader = false;
 
-        if (!this._settings.get_boolean(FINGERPRINT_AUTHENTICATION_KEY)) {
+        if (!this._settings.get_boolean(FINGERPRINT_AUTHENTICATION_KEY) ||
+            this._fprintManager == null) {
             this._updateDefaultService();
             return;
         }